<template>
  <div>
    <div class="yh">
      <van-nav-bar
        title="我的优惠"
        left-arrow
        @click-left="$router.push('/profile')"
        class="discount"
      />
    </div>

    <van-tabs v-model="active" class="channel-tabs">
      <van-tab title="红包">
        <red-packet style="background-color: #f5f5f5" />
      </van-tab>
      <van-tab title="商家代金券">
        <voucher />
      </van-tab>
    </van-tabs>
  </div>
</template>

<script>
import voucher from './voucher'
import redPacket from './redpacket'
export default {
  data() {
    return {
      active: 2,
    }
  },
  components: {
    voucher,
    redPacket,
  },
  methods: {
    onClickLeft() {},
  },
}
</script>

<style scoped lang="less">
.yh {
  /deep/.van-icon {
    color: #fff;
    font-size: 25px;
  }
  .discount {
    background-color: #3190e8;
    height: 50px;
    width: 100%;
    text-align: center;
    line-height: 50px;
    /deep/.van-nav-bar__title {
      color: #fff;
      font-weight: 700;
    }
  }
}

/deep/.van-nav-bar {
  z-index: 0;
}

/deep/ .channel-tabs {
  .van-tab--active {
    color: #3190e8;
    .van-tab__text--ellipsis {
      border-bottom: 2px solid #3190e8;
    }
  }
  .van-tabs__line {
    display: none;
  }
}
</style>